/*
 * @Author: ZhanXie
 * @Date: 2019-11-29 14:44:31
 * @LastEditors  : ZhanXie
 * @LastEditTime : 2019-12-28 17:13:15
 * @Description: redis 底层封装
 * @FilePath: /node-demo/blog-origin/src/db/redis.js
 */
const redis = require('redis')
const { REDIS_CONF } = require('../conf/db')

// 创建客户端
const redisClient = redis.createClient(REDIS_CONF.port, REDIS_CONF.host)

// 错误监听
redisClient.on('error', err => {
  console.error(err)
})

module.exports = redisClient